<?php

namespace App\Modules\Admin\Entities\Member;

use App\Models\Model;

class UserSpreadModel extends Model
{

    protected $table='user_spread';
    protected $primaryKey='id';

    public $timestamps=false;
    /**
     * 推广人uid
     * @param Model $query
     * @param $value
     */
    public function searchSpreadUidAttr($query, $value)
    {
        if (is_array($value))
            $query->whereIn('spread_uid', $value);
        else
            $query->where('spread_uid', $value);

    }

}
